Type-Directed Flow Analysis for Typed Intermediate Languages

نویسندگان

  • Suresh Jagannathan
  • Stephen Weeks
  • Andrew K. Wright
چکیده

Flow analysis is especially valuable for optimizing functional languages because control-ow information is not syntactically apparent in higher-order programs. Flow analyses typically operate on untyped languages. However, recent compilers for typed functional languages such as ML and Haskell use a typed intermediate language to expose data representations for optimization. This paper presents a polyvariant ow analysis framework for the predicative subset of system F , a common basis for typed intermediate languages. Analyses in this framework can take advantage of types to analyze programs more precisely. We study a speciic analysis called SRT that uses types to control polyvariance. We prove that SRT respects types: whenever it assigns abstract value ^ v to a variable and the type system assigns type to the same variable, then ^ v] ] ] ], where ] ] denotes a set of values. SRT does not terminate for some programs. We present several variants of SRT that are better suited to practical use.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Typed Intermediate Language for Flow-Directed Compilation

We present a typed intermediate language λ for optimizing compilers for function-oriented and polymorphically typed programming languages (e.g., ML). The language λ is a typed lambda calculus with product, sum, intersection, and union types as well as function types annotated with flow labels. A novel formulation of intersection and union types supports encoding flow information in the typed pr...

متن کامل

Typed Intermediate Languages

Programs written in a typed language are guaranteed to satisfy the safety properties of the type system without runtime checks. A type system for an intermediate language allows static verification of safety properties independent of source languages, and opens up opportunities for advanced compiler optimizations. This paper surveys three major intermediate languages: Java bytecode, typed assem...

متن کامل

A calculus with polymorphic and polyvariant flow types

We present λ, a typed λ-calculus which serves as the foundation for a typed intermediate language for optimizing compilers for higher-order polymorphic programming languages. The key innovation of λ is a novel formulation of intersection and union types and flow labels on both terms and types. These flow types can encode polyvariant control and data flow information within a polymorphically typ...

متن کامل

A Typed Intermediate Language for Supporting Multiple Inheritance via Interfaces

Some object-oriented languages, such as Java and C#, provide interfaces as a feature for supporting a restricted form of multiple inheritance. Most typed intermediate languages for compiling object-oriented languages do not support interfaces or multiple inheritance. This paper describes a typed intermediate language that supports interface implementation strategies based on interface tables (i...

متن کامل

Scala.js: Type-Directed Interoperability with Dynamically Typed Languages

Interoperability between statically typed and dynamically typed languages is increasingly important, as can be witnessed by the many statically typed languages targeting JavaScript. Interoperating with both the object-oriented and functional features of JavaScript is essential, if only to manipulate the DOM, yet existing languages have very poor support for this. We present Scala.js, a dialect ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1997